3.3.13 \(\int \frac {(c+d x^2)^2}{a+b x^2} \, dx\)

Optimal. Leaf size=63 \[ \frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}+\frac {d x (2 b c-a d)}{b^2}+\frac {d^2 x^3}{3 b} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {390, 205} \begin {gather*} \frac {d x (2 b c-a d)}{b^2}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}+\frac {d^2 x^3}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2)^2/(a + b*x^2),x]

[Out]

(d*(2*b*c - a*d)*x)/b^2 + (d^2*x^3)/(3*b) + ((b*c - a*d)^2*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(5/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rubi steps

\begin {align*} \int \frac {\left (c+d x^2\right )^2}{a+b x^2} \, dx &=\int \left (\frac {d (2 b c-a d)}{b^2}+\frac {d^2 x^2}{b}+\frac {b^2 c^2-2 a b c d+a^2 d^2}{b^2 \left (a+b x^2\right )}\right ) \, dx\\ &=\frac {d (2 b c-a d) x}{b^2}+\frac {d^2 x^3}{3 b}+\frac {(b c-a d)^2 \int \frac {1}{a+b x^2} \, dx}{b^2}\\ &=\frac {d (2 b c-a d) x}{b^2}+\frac {d^2 x^3}{3 b}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 59, normalized size = 0.94 \begin {gather*} \frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}+\frac {d x \left (-3 a d+6 b c+b d x^2\right )}{3 b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2)^2/(a + b*x^2),x]

[Out]

(d*x*(6*b*c - 3*a*d + b*d*x^2))/(3*b^2) + ((b*c - a*d)^2*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(5/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c+d x^2\right )^2}{a+b x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(c + d*x^2)^2/(a + b*x^2),x]

[Out]

IntegrateAlgebraic[(c + d*x^2)^2/(a + b*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 181, normalized size = 2.87 \begin {gather*} \left [\frac {2 \, a b^{2} d^{2} x^{3} - 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 6 \, {\left (2 \, a b^{2} c d - a^{2} b d^{2}\right )} x}{6 \, a b^{3}}, \frac {a b^{2} d^{2} x^{3} + 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + 3 \, {\left (2 \, a b^{2} c d - a^{2} b d^{2}\right )} x}{3 \, a b^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/6*(2*a*b^2*d^2*x^3 - 3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 +
 a)) + 6*(2*a*b^2*c*d - a^2*b*d^2)*x)/(a*b^3), 1/3*(a*b^2*d^2*x^3 + 3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(a*b
)*arctan(sqrt(a*b)*x/a) + 3*(2*a*b^2*c*d - a^2*b*d^2)*x)/(a*b^3)]

________________________________________________________________________________________

giac [A]  time = 0.32, size = 72, normalized size = 1.14 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} + \frac {b^{2} d^{2} x^{3} + 6 \, b^{2} c d x - 3 \, a b d^{2} x}{3 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/(b*x^2+a),x, algorithm="giac")

[Out]

(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/3*(b^2*d^2*x^3 + 6*b^2*c*d*x - 3*a*b
*d^2*x)/b^3

________________________________________________________________________________________

maple [A]  time = 0.00, size = 95, normalized size = 1.51 \begin {gather*} \frac {d^{2} x^{3}}{3 b}+\frac {a^{2} d^{2} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b^{2}}-\frac {2 a c d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b}+\frac {c^{2} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}-\frac {a \,d^{2} x}{b^{2}}+\frac {2 c d x}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x^2+c)^2/(b*x^2+a),x)

[Out]

1/3*d^2*x^3/b-d^2/b^2*a*x+2*d/b*c*x+1/b^2/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*a^2*d^2-2/b/(a*b)^(1/2)*arctan
(1/(a*b)^(1/2)*b*x)*a*c*d+1/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*c^2

________________________________________________________________________________________

maxima [A]  time = 2.40, size = 69, normalized size = 1.10 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} + \frac {b d^{2} x^{3} + 3 \, {\left (2 \, b c d - a d^{2}\right )} x}{3 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/(b*x^2+a),x, algorithm="maxima")

[Out]

(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/3*(b*d^2*x^3 + 3*(2*b*c*d - a*d^2)*x
)/b^2

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 90, normalized size = 1.43 \begin {gather*} \frac {d^2\,x^3}{3\,b}-x\,\left (\frac {a\,d^2}{b^2}-\frac {2\,c\,d}{b}\right )+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x\,{\left (a\,d-b\,c\right )}^2}{\sqrt {a}\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}\right )\,{\left (a\,d-b\,c\right )}^2}{\sqrt {a}\,b^{5/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2)^2/(a + b*x^2),x)

[Out]

(d^2*x^3)/(3*b) - x*((a*d^2)/b^2 - (2*c*d)/b) + (atan((b^(1/2)*x*(a*d - b*c)^2)/(a^(1/2)*(a^2*d^2 + b^2*c^2 -
2*a*b*c*d)))*(a*d - b*c)^2)/(a^(1/2)*b^(5/2))

________________________________________________________________________________________

sympy [B]  time = 0.44, size = 172, normalized size = 2.73 \begin {gather*} x \left (- \frac {a d^{2}}{b^{2}} + \frac {2 c d}{b}\right ) - \frac {\sqrt {- \frac {1}{a b^{5}}} \left (a d - b c\right )^{2} \log {\left (- \frac {a b^{2} \sqrt {- \frac {1}{a b^{5}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{a b^{5}}} \left (a d - b c\right )^{2} \log {\left (\frac {a b^{2} \sqrt {- \frac {1}{a b^{5}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {d^{2} x^{3}}{3 b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x**2+c)**2/(b*x**2+a),x)

[Out]

x*(-a*d**2/b**2 + 2*c*d/b) - sqrt(-1/(a*b**5))*(a*d - b*c)**2*log(-a*b**2*sqrt(-1/(a*b**5))*(a*d - b*c)**2/(a*
*2*d**2 - 2*a*b*c*d + b**2*c**2) + x)/2 + sqrt(-1/(a*b**5))*(a*d - b*c)**2*log(a*b**2*sqrt(-1/(a*b**5))*(a*d -
 b*c)**2/(a**2*d**2 - 2*a*b*c*d + b**2*c**2) + x)/2 + d**2*x**3/(3*b)

________________________________________________________________________________________